import sys
from gen_dates import *

if len(sys.argv) != 2:
  print('python ./script.py [exp_name]', flush=True)
  sys.exit(1)

exp_name = sys.argv[1]
ec = [('okex', c) for c in ['BCHABC', 'BTC', 'EOS', 'LTC']
     ] + [('huobi', c) for c in ['BCHSV', 'XRP', 'ETC', 'ETH']]

for (ex, c) in ec:
  for expiry in ['QUARTER', 'NEXT_WEEK', 'THIS_WEEK']:
    if expiry == 'QUARTER':
      dates = quarterly_dates
    else:
      dates = weekly_dates

    symbol = f'{c}-USD.{expiry}'
    print(
        f'./pyrunner ./cc/appcoin2/experimental/donggu/research/plot_trial.py {exp_name} {symbol} {dates} {duration} 2>/dev/null && echo -----'
    )
